If you wrap pattern elements in parentheses, you can use the matched contents in the replacement string. 如果使用圆括号将模式元素括起来,您可以在替换字符串中使用匹配的内容。
The first element of this is Ruby's optional parentheses in method calls; the second part is its use of semi-special naming of methods with symbols that are operators in most languages. 第一个约定是在方法调用中使用Ruby的圆括号(可选);第二个约定就是使用半专有的方法命名,其中使用了在其他语言中作为运算符的符号。
The test base grammar format uses a format of parentheses and brackets to help specify the grammar to use. 测试的基本语法格式是使用一种由圆括号和方括号组成的格式帮助指定所用的语法。
But instead of brackets or parentheses, you use curly braces. 但它不使用方括号和圆括号,而是使用尖括号。